home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Pascal / source / list manager package ƒ / TextList.r < prev   
Encoding:
Text File  |  1990-01-07  |  4.7 KB  |  307 lines  |  [TEXT/MPS ]

  1. /*
  2.  
  3.                      Sample Source Code by Jack A. Littleton
  4.  
  5.                      Example List Manager Application--TextList
  6.                      -------------------------------------------
  7.  
  8.     TextList.r -- Rez source code for all files in the package
  9.     This file and all files in this package are copyright © 1989 by
  10.     Jack A. Littleton, All rights reserved.
  11.     Version 1.0 - January 1, 1989
  12.     
  13.     This package includes:
  14.         TextList.r         -- This file
  15.         TextList.c         -- C source code
  16.         TextList.p         -- Pascal source code
  17.         PTextList.r        -- Pascal-specific Rez source code
  18.         CTextList.r        -- C-specific Rez source code
  19.         PTextList.make     -- Makefile for Pascal TextList application
  20.         CTextList.make     -- Makefile for C TextList application
  21.         
  22.         SampleList.txt    -- Documentation for this package
  23.         
  24. */
  25.  
  26. #include    "Types.r"
  27. #include    "SysTypes.r"
  28. #include    "OpusTypes.r"
  29.  
  30. type 'CASh' as 'STR ';
  31.  
  32. resource 'MENU' (1112) {
  33.     1112,
  34.     textMenuProc,
  35.     allEnabled,
  36.     enabled,
  37.     "File",
  38.     {    /* array: 10 elements */
  39.         /* [1] */
  40.         "New List ", noIcon, "N", "", plain,
  41.         /* [2] */
  42.         "Close List", noIcon, "K", "", plain,
  43.         /* [3] */
  44.         "New Row", noIcon, "R", "", plain,
  45.         /* [4] */
  46.         "Delete Row", noIcon, "D", "", plain,
  47.         /* [5] */
  48.         "\Find…", noIcon, "F", "", plain,
  49.         /* [6] */
  50.         "Quit", noIcon, "Q", "", plain
  51.     }
  52. };
  53.  
  54. resource 'MENU' (1113) {
  55.     1113,
  56.     textMenuProc,
  57.     0x7FFFFFBD,
  58.     enabled,
  59.     "Edit",
  60.     {    /* array: 8 elements */
  61.         /* [1] */
  62.         "Undo", noIcon, "Z", "", plain,
  63.         /* [2] */
  64.         "-", noIcon, "", "", plain,
  65.         /* [3] */
  66.         "Cut", noIcon, "X", "", plain,
  67.         /* [4] */
  68.         "Copy", noIcon, "C", "", plain,
  69.         /* [5] */
  70.         "Paste", noIcon, "V", "", plain,
  71.         /* [6] */
  72.         "Clear", noIcon, "", "", plain,
  73.         /* [7] */
  74.         "-", noIcon, "", "", plain,
  75.         /* [8] */
  76.         "Show Clipboard", noIcon, "", "", plain
  77.     }
  78. };
  79.  
  80. resource 'MENU' (1114) {
  81.     1114,
  82.     textMenuProc,
  83.     allEnabled,
  84.     enabled,
  85.     "List",
  86.     {    /* array: 7 elements */
  87.         /* [1] */
  88.         "One Selection Only", noIcon, "1", "", plain,
  89.         /* [2] */
  90.         "Drag Without Shift", noIcon, "2", "", plain,
  91.         /* [3] */
  92.         "No Disjoint Selections", noIcon, "3", "", plain,
  93.         /* [4] */
  94.         "Don't Extend Shift-Select", noIcon, "4", "", plain,
  95.         /* [5] */
  96.         "Don't Expand as Rects", noIcon, "5", "", plain,
  97.         /* [6] */
  98.         "Use Sense", noIcon, "6", "", plain,
  99.         /* [7] */
  100.         "Don't Highlight Empty Cells", noIcon, "7", "", plain
  101.     }
  102. };
  103.  
  104. resource 'MENU' (1115) {
  105.     1115,
  106.     textMenuProc,
  107.     allEnabled,
  108.     enabled,
  109.     "Cell",
  110.     {    /* array: 4 elements */
  111.         /* [1] */
  112.         "Indent Distance…", noIcon, "", "", plain,
  113.         /* [2] */
  114.         "Cell Size…", noIcon, "", "", plain,
  115.         /* [3] */
  116.         "Font", noIcon, hierarchicalMenu, "\0x01", plain,
  117.         /* [4] */
  118.         "Font Size…", noIcon, "", "", plain
  119.     }
  120. };
  121.  
  122. resource 'MENU' (1) {
  123.     1,
  124.     textMenuProc,
  125.     allEnabled,
  126.     enabled,
  127.     "Font",
  128.     {    /* array: 0 elements */
  129.     }
  130. };
  131.  
  132. resource 'WIND' (1112, preload) {
  133.     {40, 120, 170, 390},
  134.     altDBoxProc,
  135.     -1,
  136.     noGoAway,
  137.     0x0,
  138.     "NoName"
  139. };
  140.  
  141. resource 'WIND' (1113) {
  142.     {45, 5, 330, 505},
  143.     zoomDocProc,
  144.     invisible,
  145.     goAway,
  146.     0x0,
  147.     "\0x00"
  148. };
  149.  
  150. resource 'DLOG' (1112, "About box") {
  151.     {38, 98, 321, 404},
  152.     dBoxProc,
  153.     visible,
  154.     noGoAway,
  155.     0x0,
  156.     1112,
  157.     "NoName"
  158. };
  159.  
  160. resource 'DLOG' (128) {
  161.     {42, 54, 168, 450},
  162.     dBoxProc,
  163.     invisible,
  164.     goAway,
  165.     0x0,
  166.     128,
  167.     ""
  168. };
  169.  
  170. resource 'DLOG' (129) {
  171.     {42, 142, 120, 364},
  172.     dBoxProc,
  173.     invisible,
  174.     goAway,
  175.     0x0,
  176.     129,
  177.     "New Dialog"
  178. };
  179.  
  180. resource 'DLOG' (130) {
  181.     {40, 94, 118, 404},
  182.     dBoxProc,
  183.     visible,
  184.     goAway,
  185.     0x0,
  186.     130,
  187.     "New Dialog"
  188. };
  189.  
  190. resource 'DITL' (1112) {
  191.     {    /* array DITLarray: 1 elements */
  192.         /* [1] */
  193.         {2, 2, 281, 305},
  194.         Picture {
  195.             enabled,
  196.             128
  197.         }
  198.     }
  199. };
  200.  
  201. resource 'DITL' (128) {
  202.     {    /* array DITLarray: 6 elements */
  203.         /* [1] */
  204.         {101, 165, 121, 225},
  205.         Button {
  206.             enabled,
  207.             "OK"
  208.         },
  209.         /* [2] */
  210.         {30, 200, 46, 275},
  211.         EditText {
  212.             enabled,
  213.             ""
  214.         },
  215.         /* [3] */
  216.         {60, 200, 76, 275},
  217.         EditText {
  218.             enabled,
  219.             ""
  220.         },
  221.         /* [4] */
  222.         {30, 50, 46, 195},
  223.         StaticText {
  224.             enabled,
  225.             ""
  226.         },
  227.         /* [5] */
  228.         {60, 50, 76, 195},
  229.         StaticText {
  230.             enabled,
  231.             ""
  232.         },
  233.         /* [6] */
  234.         {6, 87, 22, 279},
  235.         StaticText {
  236.             enabled,
  237.             ""
  238.         }
  239.     }
  240. };
  241.  
  242. resource 'DITL' (129) {
  243.     {    /* array DITLarray: 3 elements */
  244.         /* [1] */
  245.         {50, 85, 70, 145},
  246.         Button {
  247.             enabled,
  248.             "OK"
  249.         },
  250.         /* [2] */
  251.         {20, 128, 36, 188},
  252.         EditText {
  253.             enabled,
  254.             ""
  255.         },
  256.         /* [3] */
  257.         {20, 51, 36, 120},
  258.         StaticText {
  259.             enabled,
  260.             "Font Size"
  261.         }
  262.     }
  263. };
  264.  
  265. resource 'DITL' (130) {
  266.     {    /* array DITLarray: 3 elements */
  267.         /* [1] */
  268.         {50, 126, 70, 186},
  269.         Button {
  270.             enabled,
  271.             "OK"
  272.         },
  273.         /* [2] */
  274.         {22, 16, 38, 297},
  275.         EditText {
  276.             enabled,
  277.             ""
  278.         },
  279.         /* [3] */
  280.         {3, 13, 19, 55},
  281.         StaticText {
  282.             disabled,
  283.             "Find:"
  284.         }
  285.     }
  286. };
  287.  
  288. resource 'STR#' (128) {
  289.     {    /* array StringArray: 4 elements */
  290.         /* [1] */
  291.         "Change Cell Indentation",
  292.         /* [2] */
  293.         "Vertical",
  294.         /* [3] */
  295.         "Horizontal",
  296.         /* [4] */
  297.         "Change Cell Size"
  298.     }
  299. };
  300.  
  301. resource 'FREF' (1101) {
  302.     'APPL',
  303.     0,
  304.     ""
  305. };
  306.  
  307.